class Driver_trainingFormModel extends Backbone.Model
    url: '/mytable/getModel?s=table.creators.Driver_trainingTable'
    initialize: (options) =>
        @fetch()
   
#--------------------------------------------------controler
class Driver_trainingsApp
    search: =>
        myapp.mainRegion.close() 
        mymodel = new Driver_trainingFormModel
        @layout = new ModelMainLayout(model: mymodel)
        myapp.mainRegion.show(@layout)

            

#--------------------------------------------------router
class Driver_trainingsAppRouter extends Backbone.Marionette.AppRouter
    appRoutes: 
        "driver_trainings": "search"

                
myapp.addInitializer -> 
    myapp.Driver_trainings_app = new Driver_trainingsApp()
    myapp.Driver_trainings_app.router = new Driver_trainingsAppRouter controller: myapp.Driver_trainings_app

myapp.vent.trigger("routing:started")
